package shin.bigenner;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.OvalShape;
import android.view.View;

public class TBox extends View {

	private ShapeDrawable _drawable;
	private int x = 0;
	private int y = 0;
	private int width = 32;
	private int height = 32;
	
	public TBox(Context context) {
		super(context);
	
		_drawable = new ShapeDrawable(new OvalShape());
		_drawable.getPaint().setColor(0xffFF0000);
				
	}
	
	protected void onDraw(Canvas canvas)
	{
		canvas.drawRect(x, y, x+width, y+height, _drawable.getPaint());
	}
	
	public void MoveLeft(int distance)	{
		x = x - distance;
		invalidate();
	}
	
	public void MoveRight(int distance)	{
		x = x + distance;
		invalidate();
	}
	
	public void MoveUp(int distance)	{
		y = y - distance;
		invalidate();
	}
	
	public void MoveDown(int distance)	{
		y = y + distance;
		invalidate();
	}
	
	
	

	
}
